<!--
 * @Author: zxc
 * @Date: 2020-10-27 16:42:33
 * @LastEditTime: 2020-10-29 15:50:00
 * @LastEditors: zxc
 * @Description: 
-->
<template>
  <a-table
    :columns="columns"
    :data-source="data"
    :rowkey="key"
    bordered
    :pagination="false"
  >
    <template #[item]="data" v-for="item in Object.keys($slots)">
      <slot :name="item" v-bind="data" />
    </template>
  </a-table>
</template>

<script>
export default {
  props: {
    columns: {
      type: Array,
      default: () => {
        return []
      }
    },
    data: {
      type: Array,
      default: () => {
        return []
      }
    },
    key: {
      type: String
    }
  }
}
</script>
